From: Keir Fraser Date: Fri, 19 Jun 2009 07:43:28 +0000 (+0100) Subject: xend: fix BlktapController's device creation X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13724 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=36553c2859c579212cb5cf264ecddf8909124b2a;p=xen.git xend: fix BlktapController's device creation Reset BlktapController's device class back to 'tap' once the device has been created. This fixes save/restore for VMs with blktap2 disks. Signed-off-by: Ryan O'Connor Signed-off-by: Dutch Meyer --- diff --git a/tools/python/xen/xend/server/BlktapController.py b/tools/python/xen/xend/server/BlktapController.py index 24d96ee581..2e6c93a896 100644 --- a/tools/python/xen/xend/server/BlktapController.py +++ b/tools/python/xen/xend/server/BlktapController.py @@ -159,6 +159,8 @@ class BlktapController(BlkifController): #modify the configuration to attach as a vbd, now that the #device is configured. Then continue to create the device config.update({'uname' : 'phy:' + device.rstrip()}) - self.deviceClass='vbd' - return BlkifController.createDevice(self, config); + self.deviceClass='vbd' + devid = BlkifController.createDevice(self, config) + self.deviceClass='tap' + return devid